package com.aspose.cells.b.a.g;

import java.text.MessageFormat;

public final class zf {
   public static StringBuilder a(StringBuilder var0, byte var1) {
      return var0.append(Byte.toString(var1));
   }

   public static StringBuilder a(StringBuilder var0, char var1, int var2) {
      for(int var3 = 0; var3 < var2; ++var3) {
         var0.append(var1);
      }

      return var0;
   }

   public static StringBuilder a(StringBuilder var0, String var1, String var2) {
      if (var1 == null) {
         throw new NullPointerException("oldStr");
      } else if ("".equals(var1)) {
         throw new IllegalArgumentException("oldStr");
      } else {
         if (var2 == null) {
            var2 = "";
         }

         int var3 = 0;
         int var4 = var1.length();

         while((var3 = var0.indexOf(var1, var3)) >= 0) {
            var0.replace(var3, var3 + var4, var2);
         }

         return var0;
      }
   }

   public static StringBuilder a(StringBuilder var0, String var1, Object... var2) {
      String var3 = MessageFormat.format(var1, var2);
      return var0.append(var3);
   }
}
